From 1af201e9bb5115d801a1d134c562e5a06bf4b08e Mon Sep 17 00:00:00 2001 From: Jonathan Blandford Date: Fri, 25 Feb 2000 22:56:58 +0000 Subject: [PATCH] let title and logo be configurable so that GNOME can use this script too. 2000-02-25 Jonathan Blandford * docs/make-todo (lineno): let title and logo be configurable so that GNOME can use this script too. * TODO.xml: added logourl and a title --- ChangeLog | 7 +++++++ ChangeLog.pre-2-0 | 7 +++++++ ChangeLog.pre-2-10 | 7 +++++++ ChangeLog.pre-2-2 | 7 +++++++ ChangeLog.pre-2-4 | 7 +++++++ ChangeLog.pre-2-6 | 7 +++++++ ChangeLog.pre-2-8 | 7 +++++++ TODO.xml | 3 ++- docs/make-todo | 36 +++++++++++++++++++++++------------- 9 files changed, 74 insertions(+), 14 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7087b59670..d5c54d946e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2000-02-25 Jonathan Blandford + + * docs/make-todo (lineno): let title and logo be configurable so + that GNOME can use this script too. + + * TODO.xml: added logourl and a title + Fri Feb 25 11:12:00 2000 Owen Taylor * TODO.xml: Added some UI items, and an explanatory diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index 7087b59670..d5c54d946e 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,10 @@ +2000-02-25 Jonathan Blandford + + * docs/make-todo (lineno): let title and logo be configurable so + that GNOME can use this script too. + + * TODO.xml: added logourl and a title + Fri Feb 25 11:12:00 2000 Owen Taylor * TODO.xml: Added some UI items, and an explanatory diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 7087b59670..d5c54d946e 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,10 @@ +2000-02-25 Jonathan Blandford + + * docs/make-todo (lineno): let title and logo be configurable so + that GNOME can use this script too. + + * TODO.xml: added logourl and a title + Fri Feb 25 11:12:00 2000 Owen Taylor * TODO.xml: Added some UI items, and an explanatory diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 7087b59670..d5c54d946e 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,10 @@ +2000-02-25 Jonathan Blandford + + * docs/make-todo (lineno): let title and logo be configurable so + that GNOME can use this script too. + + * TODO.xml: added logourl and a title + Fri Feb 25 11:12:00 2000 Owen Taylor * TODO.xml: Added some UI items, and an explanatory diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 7087b59670..d5c54d946e 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,10 @@ +2000-02-25 Jonathan Blandford + + * docs/make-todo (lineno): let title and logo be configurable so + that GNOME can use this script too. + + * TODO.xml: added logourl and a title + Fri Feb 25 11:12:00 2000 Owen Taylor * TODO.xml: Added some UI items, and an explanatory diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 7087b59670..d5c54d946e 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,10 @@ +2000-02-25 Jonathan Blandford + + * docs/make-todo (lineno): let title and logo be configurable so + that GNOME can use this script too. + + * TODO.xml: added logourl and a title + Fri Feb 25 11:12:00 2000 Owen Taylor * TODO.xml: Added some UI items, and an explanatory diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 7087b59670..d5c54d946e 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,10 @@ +2000-02-25 Jonathan Blandford + + * docs/make-todo (lineno): let title and logo be configurable so + that GNOME can use this script too. + + * TODO.xml: added logourl and a title + Fri Feb 25 11:12:00 2000 Owen Taylor * TODO.xml: Added some UI items, and an explanatory diff --git a/TODO.xml b/TODO.xml index 36cb733a7e..6fee7f0f87 100644 --- a/TODO.xml +++ b/TODO.xml @@ -7,7 +7,8 @@ $ docs/make-todo > /dev/null before committing, or you may screw up the online version --> - + + GTK+ TODO list
GDK diff --git a/docs/make-todo b/docs/make-todo index 498a1e8a41..c874519e39 100755 --- a/docs/make-todo +++ b/docs/make-todo @@ -124,6 +124,8 @@ class TodoParser (xmllib.XMLParser): self.data = "" self.section = None self.entry = None + self.logourl = None + self.title = None self.sections = [] self.entitydefs = {} @@ -131,6 +133,8 @@ class TodoParser (xmllib.XMLParser): def start_todo(self,attributes): if self.in_todo: raise ParseError, " tags may not be nested" + if attributes.has_key ("logourl"): + self.logourl = attributes["logourl"] self.in_todo = 1 def end_todo(self): @@ -150,8 +154,8 @@ class TodoParser (xmllib.XMLParser): self.section = None def start_title(self,attributes): - if not self.section and not self.entry: - raise ParseError, " tag must be in <section> or <entry>" + if not self.in_todo: + raise ParseError, "<title> tag must be in <todo>, <section> or <entry>" if self.in_data: raise ParseError, "Unexpected <title> tag in content" self.in_data = 1 @@ -160,10 +164,11 @@ class TodoParser (xmllib.XMLParser): self.in_data = 0 if self.entry: self.entry.title = self.data - self.data = "" - else: + elif self.section: self.section.title = self.data - self.data = "" + else: + self.title = self.data + self.data = "" def start_description(self,attributes): if not self.entry: @@ -295,18 +300,21 @@ while 1: lineno = lineno + 1 parser.close() +if parser.title == None: + sys.stderr.write ("<todo> Document must have a <title>\n") + sys.exit (1) print '''<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"> <html> <head> -<title>GTK+ TODO List +%s - +
- + ''' +if parser.logourl != None: + print ''' ''' % parser.logourl +print '''
-

GTK+ TODO List

''' +

%s

''' % (parser.title, parser.title) for section in parser.sections: @@ -318,14 +326,16 @@ for section in parser.sections: print '%s (%d items)
' % (id,section.title,ntasks) print ''' -
- GTK+ Logo - + Logo +
-''' +''' first = 1 for section in parser.sections: -- 2.30.2